From: Keir Fraser Date: Wed, 15 Oct 2008 14:57:20 +0000 (+0100) Subject: amd: fix CPUID mask option handling X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~14066^2~44 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success//%22http:/www.example.com/cgi/success/?a=commitdiff_plain;h=ee3ce04ad45606d7bae995c704f9651820d61c67;p=xen.git amd: fix CPUID mask option handling c/s 18402 added command line options to AMD-specific code duplicating ones already existing in Intel code. The generic command line parser didn't support this scenario for integer options, however. Additionally, the options added were using the same option string for two different purposes. Signed-off-by: Jan Beulich --- diff --git a/xen/arch/x86/cpu/amd.c b/xen/arch/x86/cpu/amd.c index 407ecf33bf..1f13d93a21 100644 --- a/xen/arch/x86/cpu/amd.c +++ b/xen/arch/x86/cpu/amd.c @@ -37,8 +37,8 @@ static unsigned int opt_cpuid_mask_ecx, opt_cpuid_mask_edx; integer_param("cpuid_mask_ecx", opt_cpuid_mask_ecx); integer_param("cpuid_mask_edx", opt_cpuid_mask_edx); static unsigned int opt_cpuid_mask_ext_ecx, opt_cpuid_mask_ext_edx; -integer_param("cpuid_mask_ecx", opt_cpuid_mask_ext_ecx); -integer_param("cpuid_mask_edx", opt_cpuid_mask_ext_edx); +integer_param("cpuid_mask_ext_ecx", opt_cpuid_mask_ext_ecx); +integer_param("cpuid_mask_ext_edx", opt_cpuid_mask_ext_edx); static inline void wrmsr_amd(unsigned int index, unsigned int lo, unsigned int hi) diff --git a/xen/common/kernel.c b/xen/common/kernel.c index 277ac21b64..2a88602e51 100644 --- a/xen/common/kernel.c +++ b/xen/common/kernel.c @@ -75,8 +75,7 @@ void cmdline_parse(char *cmdline) strlcpy(param->var, optval, param->len); break; case OPT_UINT: - *(unsigned int *)param->var = - simple_strtol(optval, (const char **)&optval, 0); + *(unsigned int *)param->var = simple_strtol(optval, NULL, 0); break; case OPT_BOOL: case OPT_INVBOOL: